package sample.innerCls;

public class Car {
	public void drive(){
		System.out.println("Driving a car!");
	}
	
	public static void main(String[]args){
		Car car=new Car(){
			//anonymity inner class extends Car
			public void drive(){
				System.out.println("Driving another Car");
			}
		};
		car.drive();
	}
}
